package org.tea.inventory.db.service;

import org.tea.inventory.db.dao.PortalUserInfoMapper;
import org.tea.inventory.db.domain.PortalUserInfo;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class PortalUserInfoService {
    @Resource
    private PortalUserInfoMapper portalUserInfoMapper;

    public PortalUserInfo queryUserInfoByLognId(String loginId) {
        return portalUserInfoMapper.selectUserInfoByLognId(loginId);
    }

    public PortalUserInfo queryUserInfoByOpenId(String openId) {
        return portalUserInfoMapper.selectUserInfoByOpenId(openId);
    }

    public PortalUserInfo queryByloginIdAndPassword(String loginId, String password) {
        return portalUserInfoMapper.selectByloginIdAndPassword(loginId, password);
    }

    public int updateUserInfo(PortalUserInfo portalUserInfo) {
        return portalUserInfoMapper.updateUserInfo(portalUserInfo);
    }
}
